Use the Database Pause event in conjunction with the Database Resume event to make FileMaker Pro Server delay accepting any modifications until the Database Resume event is received. Any B
guest who attempts to modify a paused database will receive a network coffee cup, indicating that the database is busy. Network transactions will resume when the database is returned from its paused state using
If (Record Type & RecordNumber = RecordNumber, 1, "")
Event
Intro
A Main Menu
Introduction to Apple events
Event Data
Events List
Table of Contents
Descriptions and Examples
A Main MenuB
Access@
Applescript@
Avaiable
:sroom-based@
Developers@
Following@
Install
Like@
Must@
Performing@
Rename
Support@
Today
Quit@
Waiting@
Allows
Encounter@
Registry@
Well@
Tell@
Asking@
Canceling@
Component@
EventsB
Guests
Pulled@
TellB
WithA
Introduction to Apple Events
E#FileMaker Pro Server & Apple Events
FileMaker Pro Server Events
Events List
EAPlease click on the text or icon of an area.
Click here for Help.
E=Copyright
1992-1994 Claris Corporation.
All Rights Reserved.
Descriptions and
Examples
Find an Event
Find an Event
Introduction to Apple eventsB
Introduction
to Apple Events
Introduction
to Apple Events
Event DataB
FileMaker Pro Server Event Data
Parameters
Description
Default Type
Notes
Event ID & Constant
Reply Parameters
Description
Default Typeeply Parameters
Description
Default Type
Examples
Class ID & Constant
User Terminology
Description
ETExtensions to the standard parameters for events are denoted by their bold keywords.
Events ListB
Class Constant
Event Constant
FileMaker Pro Server Events
User Terminology
E.For more information click an event or object.
Event ID
Event Class
Table of ContentsB
Table of ContentsB
EXSelect the topic of interest or click the button to the right to start at the beginning.
From Beginning
Table Of Contents
Topic Heading
HelpB
HelpB
Using This Database
E!Click here to see previous record
Click here to see next record
E#Click here to find a specific Event
E.Click here to find out more about Apple Events
bk here to see previous record
Click here to see next record
E#Click here to find a specific Event
E.Click here to find out more about Apple Events
E?Click here to see full page descriptions of an Event or Object
Click here to go to Main Menu
Click here to list all Events
This Help Screen
This database introduces users to the support for Apple events in FileMaker Pro Server. It uses a variety of layouts, each intended to display a particular kind of information.
When you first open this data
base, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it. These icons are used throughout the dC
atabase to let you change the information displayed without having to return to the main screen. The backward and forward arrow icons shown above switch to the previous and next records, respectively. You can
also use the layout pop-up menu in the status area, record book, or scripts to move through the database.
Note: Not all records in this database have data for every field. If you encounter a blank recoE
rd while browsing one layout, you have reached the end of the information given for that layout. Choose another layout to see more information.
Using the Navigation Layouts
Introduction to Apple Events
This
layout is intended to provide background information about Apple events, and the Apple Event Registry, as well as information about support for Apple events in FileMaker Pro Server. Each record has an informaG
tive text field and examples, when appropriate.
Events List
This layout provides a list view all of the Events which are supported in FileMaker Pro Server. Clicking on the title of an Event will switch to a de
tailed view of the item.
Using the Content Layouts
Event Data
This layout gives detailed information about each Event that FileMaker Pro Server supports. The information supplied includes the event class, IDI
, terminology, and input and result parameters. The Examples field provides some samples for using the event using a fictitious syntax similar to the AppleScript language. The Notes field provides some addit
Jyional information about the event. Extensions to the standard parameters for events are denoted by their bold keywords.
E,Use the scroll bars to see more information.
Descriptions and ExamplesB
Descriptions and ExamplesB
Description
and Examples
Show Detail
Description
and Examples
Show Detail
FindB
E6Please type your find request and press the Enter key.
Find Event
kAERequiredSuiteZ
'aevt'\
kAEQuitApplication]
'quit'f
Quits FileMaker Pro Server.g
Quits FileMaker Pro Serverh
-A5Quit
tell application "FileMaker Pro Server" to quit
This database is designed to introduce users to the support for Apple events in FileMaker Pro 2.0. It uses a variety of layouts, each intended to display a particular kind of information.
When you B
first open this database, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it. These icons are u
sed throughout the database to let you change the information displayed without having to return to the main screen. The forward and backward arrow icons above switch to the next and previous records, respectiD
vely. You can also use the layout pop-up menu in the status area, record book or scripts to move through the database.
Note: not all records in this database have data for every field. If you enco
unter a blank record while browsing one layout, you have reached the end of the information given for that layout. Choose another layout to continue with more information.
Using the Navigation Layouts
F
Introduction to Apple Events
This layout is intended to provide background information about Apple events, the Apple Event Object Model, and the Apple Event Registry, as well as information about suppor
t for Apple events in FileMaker Pro. Each record has an informative text field as well as an (optional) example.
FileMaker Objects Map
This layout is a navigation aid for getting to the informatH
ion about a specific Event or Object. It displays all of the Events and Objects which are supported in FileMaker Pro 2.0, grouped according to Apple Event Suites. Clicking on the title of an Object or Event w
ill switch to a detailed view of the item.
Object Hierarchy
This layout provides a view of the containment hierarchy in FileMaker Pro. That is, objects appearing to the right are contained in objeJ
cts to the right of them. This containment is indicated by dotted gray lines. Clicking on the title of an Object will switch to a detailed view of that class.
Objects and Events List
This layout
provides a list view all of the Events and Objects which are supported in FileMaker Pro 2.0. It provides the same infomation as the
FileMaker Objects Map
in a different manner. Clicking on the title of an OL
bject or Event will switch to a detailed view of the item.
Using the Content Layouts
FileMaker Events
This layout gives detailed information about each Event which FileMaker Pro 2.0 supports. Th
e information supplied includes the event class, ID, terminology, and input and result parameters. The
Examples
field provides some samples for using the event using a fictitious syntax similar to the HyperN
Talk language. The
Notes
field provides some additional information about the event. Extensions to the standard parameters for events are denoted by their bold keywords.
bases opened on that guest, this command should be used with care.
The difference between the Quit and Force Quit events is that the Force Quit event automatically disconnects guests who won't log off the hostF
Examples
For AppleScript users:
tell application "FileMaker Pro Server" to quit
For Frontier users:
with FileMaker
QuitApplication()
All Frontier examples assume a table called FileMakerProServer, p
ect cleanly, either automatically or voluntarily. If a guest keeps refusing to close the file or files, the Quit event then brings up a dialog box that allows the FileMaker Pro Server administrator to choose beD
tween disconnecting all guests, asking them again to log off, or canceling the request. Disconnecting the guest forcefully causes the FileMaker Pro application on that guest to quit. Since this may damage data
What can I do with it?
Use the Quit event to make FileMaker Pro Server quit just as if you had pulled down the File menu and selected Quit. If guests are using any databases opened by FileMaker Pro Server, theyB
will be notified as usual of the need to close. The event is responded to immediately, since waiting for FileMaker Pro Server to terminate may take several minutes.
Guests get at least four chances to disconn
Quitt
Quitu
Eventv
2 Server, is installed in the Frontier.root. See the Introduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
Quitt
Quitu
Eventv
kCoreEventClassZ
'aevt'\
kAEOpenDocument]
'odoc'^
keyDirectObject_ typeAlias`
a*The alias record of the file to be opened.f-Opens the indicated FileMaker Pro document. g
Opens the indicated documents.h
Open Documentk
'----'
Open <file alias>
specify the entire path.
Examples
For AppleScript users:
tell application "FileMaker Pro Server"
open {file "Contacts", file "Projects"}
open "IIcx:FileMaker Pro 2.1 Folder:test"
end tell
For FronD
tier users:
with FileMakerProServer
open("Trilda:FileMaker Pro Server Folder:Addresses")
All Frontier examples assume a table called FileMakerProServer, provided with FileMaker Pro Server, is installed i
What can I do with it?
Use the Open Document event to open files from which you need to access data. The Open Document event works just as if you had used the Open Database button in the FileMaker Pro Server AdB
ministration dialog to open a file.
Note: When specifying a database located in the FileMaker Pro Server folder you can supply either the name of the database or the path. For databases located anywhere else,
Open Documentt
Open Documentu
Eventv
kAERequiredSuiteZ
'aevt'\
kAEOpenApplication]
'oapp'
Open Documentt
Open Documentu
Eventv
kAERequiredSuiteZ
'aevt'\
kAEOpenApplication]
'oapp'
Inside Macintosh Volume VI states that only Finder should send this event. FileMaker Pro Server will not accept this event from other applications.g`Performs startup operations for FileMaker Pro Server. Note: Only Finder should send this event.h
Open Applicationm.tell application "FileMaker Pro Server" to run
aunch()
All Frontier examples assume a table called FileMakerProServer, provided with FileMaker Pro Server, is installed in the Frontier.root. See the Introduction to Apple Events layout for information on insH/talling the FileMaker Pro Server.Frontier file.
tell application "FileMaker Pro Server" to launch
The above syntax would launch FileMaker Pro Server, but since the launch event does not include an open application component, the application would not perfF
orm all normal launch procedures. In this case, it would not open any multi-user databases occupying the same folder as the FileMaker Pro Server application.
For Frontier users:
with FileMakerProServer
cation. See examples below in the AppleScript users section.
Most AppleScript and Frontier users will not need to use this event.
Examples
For AppleScript users:
tell application "FileMaker Pro Server" to rD
The above syntax would launch FileMaker Pro Server just as if you had opened it from the Finder, including opening any multi-user databases occupying the same folder as the FileMaker Pro Server application.
What can I do with it?
The Open Application event is triggered when FileMaker Pro Server is run from the Finder.
Since the Finder is the only application that is supposed to launch other applications, FileMakeB
r Pro Server will only respond to this event when it is sent from the Finder. If you wish to have FileMaker Pro Server open other applications you should use the launch application syntax instead of Open Appli
Open Applicationt
Open Applicationu
Eventv
kaFMServerEventClassZ
'FMPA'\
kaFSCloseDocEvent]
'cdoc'^
keyDirectObject_ typeAlias`
a&The alias record of the file to close.f^Closes files hosted by FileMaker Pro Server.
Each alias record specifies a document to close.SCloseDocEvent]
'cdoc'^
keyDirectObject_ typeAlias`
a&The alias record of the file to close.f^Closes files hosted by FileMaker Pro Server.
Each alias record specifies a document to close.
Closes the indicated objects.h
Closek
'----'
-A*Close <object specifier>
Close "Addresses"
What can I do with it?
Use the Close event to make FileMaker Pro Server close a database just as if you had used the Close Database button in the FileMaker Pro Server Administration dialog.
Guests will get at
ication on the guest machine to exit automatically. Since this may damage databases opened on that guest, this command should be used with care.
Note: When specifying a database located in the FileMaker Pro SE
erver folder you can supply either the name of the database or the path. For databases located anywhere else, specify the entire path.
Examples
For AppleScript users:
tell application "FileMaker Pro Server"
close "Addresses"
end tell
For Frontier users:
with FileMakerProServer
close("Addresses")
All Frontier examples assume a table called FileMakerProServer, provided with FileMaker Pro Server, is instG
alled in the Frontier.root. See the Introduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
from the file, which will cause the FileMaker Pro appl
Closeinstalled in the Frontier.root. See the Introduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
Close
Closeu
Eventv
Apple events let applications communicate with one another under System 7 on the same Macintosh computer or over a network. It is primarily a data transport mechanism. Both the sending and receiving applicatB
ion must agree to use a mutually understood data format in order to communicate.
An example of this is Finder 7. The Finder can send four simple Apple events (also called the Required events) that all System
7-savvy applications are required to understand: Open Application, Open Documents, Print Documents, and Quit Application. Because both applications understand what is meant by these events, the appropriate acD
tions take place when Finder sends them. Applications can also use these events to make other applications perform the desired actions.
What are Apple Events?G
This database is designed to introduce users to the support for Apple events in FileMaker Pro 2.0. It uses a variety of layouts, each intended to display a particular kind of information.
When you E
What are Apple Events?G
This database is designed to introduce users to the support for Apple events in FileMaker Pro 2.0. It uses a variety of layouts, each intended to display a particular kind of information.
When you
first open this database, you are presented with the main screen, which allows you to choose from among several options. To choose an option, click on the text or the button icon next to it. These icons are uC
sed throughout the database to let you change the information displayed without having to return to the main screen. The forward and backward arrow icons above switch to the next and previous records, respecti
vely. You can also use the layout pop-up menu in the status area, record book or scripts to move through the database.
Note: not all records in this database have data for every field. If you encoE
unter a blank record while browsing one layout, you have reached the end of the information given for that layout. Choose another layout to continue with more information.
Using the Navigation Layouts
Introduction to Apple Events
This layout is intended to provide background information about Apple events, the Apple Event Object Model, and the Apple Event Registry, as well as information about supporG
t for Apple events in FileMaker Pro. Each record has an informative text field as well as an (optional) example.
FileMaker Objects Map
This layout is a navigation aid for getting to the informat
ion about a specific Event or Object. It displays all of the Events and Objects which are supported in FileMaker Pro 2.0, grouped according to Apple Event Suites. Clicking on the title of an Object or Event wI
ill switch to a detailed view of the item.
Object Hierarchy
This layout provides a view of the containment hierarchy in FileMaker Pro. That is, objects appearing to the right are contained in obje
cts to the right of them. This containment is indicated by dotted gray lines. Clicking on the title of an Object will switch to a detailed view of that class.
Objects and Events List
This layout K
provides a list view all of the Events and Objects which are supported in FileMaker Pro 2.0. It provides the same infomation as the
FileMaker Objects Map
in a different manner. Clicking on the title of an O
bject or Event will switch to a detailed view of the item.
Using the Content Layouts
FileMaker Events
This layout gives detailed information about each Event which FileMaker Pro 2.0 supports. ThM
e information supplied includes the event class, ID, terminology, and input and result parameters. The
Examples
field provides some samples for using the event using a fictitious syntax similar to the Hyper
Talk language. The
Notes
field provides some additional information about the event. Extensions to the standard parameters for events are denoted by their bold keywords.
Introv
An Apple event consists of several pieces of information:
event name
event class
event ID
event parameters
The event class groups related events together. The event ID uniquely identifies the
event.
The number of parameters and their meaning varies depending on the Apple event. Each component of the event is represented by a four character code. An example of a parameter is the
direct object
parameter for the Open Documents event, which specifies the document that is to be opened.
Parameters usually indicate the:
object (for example, window, document, or script) on which the Apple event s
hould act
data to use (for example, a picture to paste)
desired options when performing the event (for example, with or without dialog or page
numbers to print)
E The Components of an Apple EventG
Apple Event Components and Examples
Event Name Event Class Event ID Parameters (vary)
Open ApB
plication 'aevt' 'oapp' none
Open Documents 'aevt' 'odoc' '----' (the documents to open)
Print Documents 'aevt'
'pdoc' '----' (the documents to print)
Quit Application 'aevt' 'quit' none
Do Script 'misc' 'D.dosc' '----' (the script to perform)
Introv
Functionally related objects and events are grouped together in suites:
the Required suite
the Core suite (common to all applications)
the Text suite (for word processors)
the Graphics sui
a subset of it. For example, a word processor might support the Core and Text suites fully but only support the portions of the Table or Database suites necessary to perform a mail merge.
FileMaker Pro 2.0E
and later versions support nearly all of the events and objects defined in the Core, Table, and Database suites. Together, these events are called the FileMaker suite.
support an entire suite or
te (for graphics programs)
the Table suite (for tabular data)
the Database suite (for database programs)
the Miscellaneous Standards suite (for the miscellaneous bits, like scripts, that some
applications support)
All suites inherit the events and objects in the Core suite. Some applications define extensions to the events and/or objects of a suite. Applications may support an entire suite or
Apple Event SuitesG
Introv
Apple Event SuitesG
Introv
FileMaker Pro Server supports a subset of the Core suite of Apple events: open document, close, and quit. In addition, FileMaker Pro Server supports the FileMaker Pro Server suite of events, which include forceB8 quit, force close, database pause, and database resume.
E%FileMaker Pro Server Supported EventsG
Introv
pause/resume file <file name> because it is already
in the pause/resume state."
-9008 aerrFileGuestLocks "Could not pause file <file name> because of outstanding
H
database locks from guests."
-9009 aerrQuitting "Could not complete operation because the application is in the
process of quitting."
try opening in non-Server version of FileMaker Pro."
-9005 aerrNameAlreadyUsed "File <file name> could not be opened: a database with that name
is already open; please renaF
me one of the files."
-9006 aerrFileClosing "Could not complete operation on file <file name> because it is
in the process of closing."
-9007 aerrFilePauseState "Could not
in FileMaker Pro."
-9002 aerrFileAlreadyOpen "File <file name> could not be opened: already open by another
application."
-9003 aerrFileNotFMProDB "File <D
file name> could not be opened: not a FileMaker Pro
database."
-9004 aerrDamagedFile "File <file name> could not be opened: database may be damaged;
FileMaker Pro Server returns the following error codes:
Number Constant Text
-43 aerrFileNotOpened "File <file name> could not be opened: file was not found."
-9000 aerrFileNotOpened "Could nB
ot complete operation on file <file name> because it is
not currently open."
-9001 aerrFileExclusive "File <file name> could not be opened: must be set to Multi-User
VE FileMaker Pro Server Error CodesG
Introv
Helpu
Helpv
kaFMServerEventClassZ
'FMPA'\
kaFSFQuitEvent]
'FQUI'fzAutomatically disconnects all guests. This command should be used with care. The Force Quit sequence cannot be aborted. The difference between the Quit and Force Quit events is that the Force Quit event autoB8matically disconnects guests who won't log off the host.
rces FileMaker Pro Server to quit without interaction. without interaction.
Force Quit
-AAForce Quit
tell application "FileMaker Pro Server" to force quit
e difference between the Quit and Force Quit events is that tB
he Force Quit event automatically disconnects guests who won't log off the host. The Quit event brings up a dialog box that allows the FileMaker Pro Server administrator to choose between disconnecting all gues
databases opened on that guest, this command should be used with care. The Force Quit sequence cannot be aborted.
Examples
For AppleScript users:
tell application "FileMaker Pro Server" to force quit
For FF
rontier users:
with FileMakerProServer
forceQuit()
All Frontier examples assume a table called FileMakerProServer, provided with FileMaker Pro Server, is installed in the Frontier.root. See the Introduct
4n installing the FileMaker Pro Server.Frontier file.
ts, asking them again to log off, or canceling the request. The Force Quit sequence cannot be aborted.
Guests will get at least four chances to disconnect cleanly, either automatically or voluntarily. If a guD
est keeps refusing to close the file, FileMaker Pro Server will quit anyway, disconnecting the guest forcefully, causing the FileMaker Pro application on that guest to quit automatically. Since this may damage
stalling the FileMaker Pro Server.Frontier file.
Force Quitt
Force Quitu
Eventv
kaFMServerEventClassZ
'FMPA'\
kaFSFCloseDocEvent]
'FCLO'^
keyDirectObject_ typeAlias`
Force Quitt
Force Quitu
Eventv
kaFMServerEventClassZ
'FMPA'\
kaFSFCloseDocEvent]
'FCLO'^
keyDirectObject_ typeAlias`
Ya*The alias record of the file to be closed.f
Automatically disconnects all guests from a file. This command should be used with care. The Force Close sequence cannot be aborted.
nts is that the Force Close event automatically disconnects guests who won't log off the host.
FileMaker Pro Server will close the file anyway, disconnecting the guest forcefully, causing the FileMaker Pro application on that guest to quit automatically. This may damage databases openedC
on that guest.
e between the Close and Force Close events is that the Force Close event automatically disconnects guests who won't log off the host. The Close event brings up a dialog box that allows the FileMaker Pro ServerC
administrator to choose between disconnecting all guests, asking them again to log off, or canceling the request. The Force Close sequence cannot be aborted.
Guests will get at least four chances to disconne
ct cleanly, either automatically or voluntarily. If a guest keeps refusing to close the file, FileMaker Pro Server will close the file anyway, disconnecting the guest forcefully, causing the FileMaker Pro appliE
cation on that guest to quit automatically. Since this may damage databases opened on that guest, this command should be used with care. The Force Close sequence cannot be aborted.
Note: When specifying a da
tabase located in the FileMaker Pro Server folder you can supply either the name of the database or the path. For databases located anywhere else, specify the entire path.
Examples
For AppleScript users:
telG
l application "FileMaker Pro Server"
force close window 1
end tell
Below is an example of an AppleScript that keeps trying to close a file until the file gets closed. This script would be useful if you se
t up an automated close and back up sequence, and needed to keep trying indefinitely until a file was closed.
repeat until FileIsClosed("file.fm")
end repeat
on FileIsClosed(filename)
tell application "I
FileMaker Pro Server"
try
force close filename
return false
on error number errNum
return (errNum is not -9006)
end try
end tell
end FileIsClosed
For Frontier users:
Force Closet
Force Closeu
Eventv
kaFMServerEventClassZ
'FMPA'\
kaFSPauseEvent]
'PAUS'^
keyDirectObject_ typeAlias`
a*The alias record of the file to be paused.
Database modifications are suspended while a database is paused. All guests attempting to make modifications will get a coffee cup, signifying the file is busy, until the server resume event is sent, freeing th
V can use this event to do things like back up a file without disconnecting all guests.
Pauses a file. file.
Database Pausek
'----'m+database pause "FM Pro Server Apple Events"
What can I do with it?
Use the Database Pause event in conjunction with the Database Resume event to make FileMaker Pro Server delay accepting any modifications until the Database Resume event is received. Any B
guest who attempts to modify a paused database will receive a network coffee cup, indicating that the database is busy. Network transactions will resume when the database is returned from its paused state using
-- Do Nothing
end try
end repeat
end repeat
return FilesThatHaveBeenPaused
end tell
end AttemptToPause
For Frontier users:
with FileMakerProServer
databasePause(J
"Addresses")
All Frontier examples assume a table called FileMakerProServer, provided with FileMaker Pro Server, is installed in the Frontier.root. See the Introduction to Apple Events layout for information oK5n installing the FileMaker Pro Server.Frontier file.
AttemptToPause({"Random.fm"}, 5)
on AttemptToPause(ListOfFiles, Attempts)
set FilesThatHaveBeenPaused to {}
tell application "FileMaker Pro Server"
repeat with x in ListOfFiles
repeat witH
h y from 1 to Attempts
try
database pause (contents of x)
set FilesThatHaveBeenPaused to FilesThatHaveBeenPaused & (contents of x)
exit repeat
on error
, specify the entire path.
Examples
For AppleScript users:
tell application "FileMaker Pro Server"
database pause "database1.fm"
database pause "HD:DBs:database1.fm"
end tell
The following script wilF
l cycle through a list of files, attempting to pause each in turn. It will continue until they are all paused, or the script writer decides no more attempts should be made. In this case, five attempts are made.
5n installing the FileMaker Pro Server.Frontier file.
the Database Resume event.
Guests can browse, find, and sort records normally when a database is paused. The Database Pause event is handy for allowing databases to be copied or backed up, for example, withoD
ut forcing all guests to disconnect.
Note: When specifying a database located in the FileMaker Pro Server folder you can supply either the name of the database or the path. For databases located anywhere else
?ormation on installing the FileMaker Pro Server.Frontier file.
Database Pauset
Database Pauseu
Eventv
Database Pauset
Database Pauseu
Eventv
kaFMServerEventClassZ
'FMPA'\
kaFSResumeEvent]
'RESU'^
keyDirectObject_ typeAlias`
a.The alias record of the paused file to resume.f
Database modifications are suspended while a database is paused. All guests making modifications will get a coffee cup, signifying the file is busy, until the server resume event is sent, freeing the file.g-Resumes a paused file, allowing guest access.h
Database Resumek
'----'m,database resume "FM Pro Server Apple Events"
Server"
database resume "database1.fm"
database resume "HD:DBs:database1.fm"
end tell
For Frontier users:
with FileMakerProServer
databaseResume("Addresses")
All Frontier examples assume a tableF
called FileMakerProServer, provided with FileMaker Pro Server, is installed in the Frontier.root. See the Introduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier filG
Resume event.
The Database Pause event is handy for allowing databases to be copied or backed up, for example, without forcing all guests to disconnect.
Note: When specifying a database located in the FileMaD
ker Pro Server folder you can supply either the name of the database or the path. For databases located anywhere else, specify the entire path.
Examples
For AppleScript users:
tell application "FileMaker Pro
What can I do with it?
Use the Database Resume event in conjunction with the Database Pause event to make FileMaker Pro Server refuse to accept any new activity, and then to restore activity. Any guest who atteB
mpts to modify a paused database will receive a network coffee cup, indicating that the database is busy. Network transactions will resume when the database is returned from its paused state using the Database
Database Resumet
Database Resumeu
Eventv
FileMaker Pro Server cannot calculate the Today function by itself. Use FileMaker Pro to complete this operation, using one of two methods:
Locally, close the database with FileMaker Pro Server, and reopen i Pro to complete this operation, using one of two methods:
Locally, close the database with FileMaker Pro Server, and reopen i
t with FileMaker Pro. FileMaker Pro will automatically calculate the Today function as the file is opened. When the calculation is complete, close the file, and reopen it with FileMaker Pro Server.
RemoteC
ly, close and reopen the database with the administration feature of FileMaker Pro 2.1v3. Then, open the file as a guest using FileMaker Pro 2.1v3 or later. The guest will now calculate the Today function. This
should be done before any other guests log on to the file.
See the FileMaker Pro Server Administrator's Guide for more information on these steps.
There are some ways Apple events can be used to make these E
steps easier. For example, you could write a script that makes repeated attempts to close the database in question. Such a script could even be used in conjunction with an Apple event-aware scheduling product t
o automate the process. Below is an example in AppleScript that makes repeated attempts to close files in FileMaker Pro Server so that they can then be opened by FileMaker Pro.
Finally, there may be other waysG
of getting the same functionality as the Today function in a database without actually using it. For example, you can define a FileMaker Pro script that finds all records, and uses the Replace command to put t
he current date into a field for all records. This would trigger a recalculation for any field that looks at that date, just as if it were the Today function. All you would have to do then is call that script wI:henever you need to recalculate based on the current date.
E+The Today function and FileMaker Pro ServerG
repeat until FileIsClosed("file.fm")
end repeat
on FileIsClosed(filename)
tell application "FileMaker Pro Server"
try
force close filename
return false
on error number errNum
BK return (errNum is not -9006)
end try
end tell
end FileIsClosed
introv
In order to work with FileMaker Pro Server from Frontier, you should create a FileMaker Pro Server table, containing the events supported by FileMaker Pro Server. To make this easier for you, we have included aB
Frontier table, FileMaker Pro Server.Frontier, containing the relevant information which can be imported into your Object Database.
To install the FileMaker Pro Server.Frontier table, simply double-click the
table. You will be asked if you want to install it. Click OK, and the table will be installed.
This table will be of primary interest to users of Frontier 2.0 and earlier, who do not have the ability to extracDjt event information directly from the application.
Please see your Frontier documentation for details.
E!FileMaker Pro Server and FrontierG
introv
e Board:General Discussion:AppleScript
Keyword USERLAND
CompuServe
Go MACDEV, Message Sections:Scripting Month [10]
Go MACCLARIS, Browse Messages, FileMaker [2]
Go USERLAND
SCRIPTING SUPPORT
Apple Computer pJ
rovides support for AppleScript and HyperCard. All customers have access to toll-free telephone support for pre-sales and
up and running
support by calling Apple Assurance at (800) SOS-APPL. Advanced scriptin
serLand Software can be reached at (415) 369-6600.
ONLINE FORUMS
AppleLink
Developer Support: AppleScript Talk
Third Parties:Third Parties A-G:Claris:Claris InfoCenter:Technical Support - (Read):Technical SupH
port: FileMaker
Third Parties: Third Parties P-Z: UserLand Discussions
2G`ion to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
least four chances to disconnect cleanly, either automatically or voluntarily. If a guest keeps refusing to close the file, the Close event brings up a dialog box that allows the FileMaker Pro Server administraC
tor to choose between disconnecting all guests, asking them again to log off, or canceling the request. Disconnecting the guest forcefully ejects the guest from the file, which will cause the FileMaker Pro appl
rovided with FileMaker Pro Server, is installed in the Frontier.root. See the Introduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
Users
Using
Usual
Voluntarily
Waiting
Which
Won't
trily
Waiting
Which
Won't
Frontier
Guest
Guests
Immediately
Information
Installed
Installing
Introduction
Keeps
Layout
Least
Minutes
Notified
Opened
Provided
Pulled
Quitapplication
Refusing
Request
Responded
Selected
Server
Several
Should
Since
Table
Terminate
Toe through Apple retail channels.
AppleScript Software Development Toolkit v. 1.1
Available from APDA, $199.00 (U.S.).
UserLand Frontier
UserLand Software, Inc.
Suggested retail price is $249.00 (U.S.). UserL
Volume
Wesley
Whenever
Which
Window
Without
Would
Write
Apple
Codes
Components
Error
Event
Events
Filemaker
Frontier
Function
References
Server
Suites
Supported
Today
g support is available for a fee by calling (800) 950-2442.
TRAINING
Self-paced and classroom-based instruction is available from Apple Computer's Developer University (408) 974-4897, fax (408) 974-0544, and AL
ppleLink: DEVLINK. Currently course offerings include "Scripting with AppleScript", "Introduction to AppleScript", and "Apple Events/AppleScript Programming."
Avaiable
Available
Based
Because
Before
Below
Board
Boards
Books
Browse
Calculate
Calculation
California
Called
Calling
Canada
Cannot
Channels
Chapter
Character
Claris
Class
Necessary
Objects
Perform
Portions
Processor
Processors
Programs
Related
Required
Scripts
Standards
Subset
Suite
Suites
Support
Supports
Table
Locally
Locks
Looks
Macclaris
Macdev
Macintosh
Makes
Manager
Meaning
Meant
Mechanism
Menlo
Merge
Message
Messages
Methods
Might
Miscellaneous
Model
Month
Multi-user
Avaiable
Classroom-based@
Developers@
Following@
Install
Like@
Must@
Performing@
Rename
Support@
Today
Quit@
Applications@
Modifications@
While
Waiting@
Force
Allows
Encounter@
Registry@
Well@
Tell@
Asking@
Canceling@
Component@
EventsB
Guests
Pulled@
TellB
WithA
Modifications
Opens
Other
Paused
Quits
Record
Resume
Sequence
Server
Should
Signifying
Specifies
States
Suspended
Things
YThis
Yver"
database pause "database1.fm"
database pause "HD:DBs:database1.fm"
end tell
The following
Applications
Attempting
Automatically
Cannot
Close
Closes
Coffee
Command
Database
Disconnecting
Disconnects
Doects
DoDos
DoDoDoDos
DoDoX
DoDocts
DoDots
DoDocts
DoDoDocts
DoDo{}
tell application "FileMaker Pro Server"
repeat with x in ListOfFiles
return FilesThatHaveBeenPaused
end tell
end AttemptToPause
For Frontier users:
with FileMakerProServer
data
Pauses a file.ses a file.necting
Event
Freeing
Guest
Guests
Interact
Paused
Resume
Server
Signifying
Things
Until
Without
ion to Apple Events layout for infJ?ormation on installing the FileMaker Pro Server.Frontier file.
the path. For databases located anywhere else
Force
Object
Pause
Resume
Server
Specifier
About
Above
According
Additional
Allows
Following
Forcing
Frontier
Guest
Guests
Handy
Indicating
Information
Installed
Installing
Introduction
Layout
Listoffiles
Madeough
Transactions
Until
Users
Using
Without
Writer
Force@
Allows
Encounter@
Registry@
Well@
Tell@
Asking@
Canceling@
Component@
Else@
EventsB
Folder
Guests
Located@
Pulled@
Specify@
TellB
WhenB
WithA
with FileMakerProServer
forceClose("Addresses")
All Frontier examples assume a table called FileMakerProServer, provided with FileMaker Pro Server, is installed in the Frontier.root. See the Introduction tK[o Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
request. The Force Close sequence cannot be aborted.
Guests will get at least four chances to disconne
YgRCloses a database hosted by FileMaker Pro Server without waiting for confirmation.h
Force Closek
'----'m(force close "FM Pro Server Apple Events"
What can I do with it?
Use the Force Close event to make FileMaker Pro Server close a database just as if you had used the Close Database button in the FileMaker Pro Server Administration dialog. The differenc
While
Without
Access
Allowing
Closes
Confirmation
Database
Documents
Event
Filemaker
Finder
Forces
Guest
Hosted
Indicated
Interaction
Objects
Opens
Operations
Paused
Pauses
Performs
Quits
Resumes
Server
Should
Startup
&Bwe file.
The server administrator can use this event to do things like back up a file without disconnecting all guests.
uestNo
Normally
Nothing
Pause
Paused
Provided
Random
Receive
Received
Records
Repeat
Resume
Return
Returned
Script
Server
Should
State
Table
Through
Transactions
Until
Users
Using
Without
Writer
Accepting
Xg9Forces FileMaker Pro Server to quit without interaction. he Force Quit event automatically disconnects guests who won't log off the host.
g9Forces FileMaker Pro Server to quit without interaction. the IntroJdduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.
st, this command should be used with care.
The Force Close sequence cannot be aborted.
Examples
What can I do with it?
Use the Force Quit event to make FileMaker Pro Server quit just as if you had pulled down the File menu and selected Quit. The difference between the Quit and Force Quit events is that tB
he Force Quit event automatically disconnects guests who won't log off the host. The Quit event brings up a dialog box that allows the FileMaker Pro Server administrator to choose between disconnecting all gues
E#FileMaker Pro Server & Apple Events
tell application "FileMaker Pro Server"
repeat with x in ListOfFiles
n the Frontier.root. See the Introduction to Apple Events layout for information on installing the FileMaker Pro Server.Frontier file.